def print_four_right_triangles_simple(n):
    print("\n1. 左上直角三角形:")
    i = 1
    while i <= n:
        print('*' * i)
        i += 1

    print("\n2. 右上直角三角形:")
    i = 1
    while i <= n:
        print(' ' * (n - i) + '*' * i)
        i += 1

    print("\n3. 左下直角三角形:")
    i = n
    while i >= 1:
        print('*' * i)
        i -= 1

    print("\n4. 右下直角三角形:")
    i = n
    while i >= 1:
        print(' ' * (n - i) + '*' * i)
        i -= 1

n = int(input("请输入三角形的行数: "))
print_four_right_triangles_simple(n)